#include "mpx_supt.h"
#include "pcb_strc.h"
#include "com_hand.h"
#include "dispatch.h"

int main() {
	sys_init(MODULE_R1 + MODULE_R2 + MODULE_R3 + MODULE_R4 + MODULE_F);
	
	com_handler_init();
	pcb_queues_init();
	dispatch_init();
	open_io();
	
	load_comhan_proc();
	load_process("idle", -128, PROC_CLASS_SYS);
	cmd_resume("idle");
	
	com_handler_welcome();
	dispatch();
	com_handler_goodbye();
	
	close_io();
	free_pcb_queues();
	free_com_dict();
	//sys_exit();
	return 0;
}